﻿<UserControl x:Class="MetaTool.Views.Flyouts.FlyoutKeyValueView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:cal="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="500">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.AnimatedSingleRowTabControl.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro.Resources;component/Icons.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/FlatButton.xaml" />
                <ResourceDictionary Source="pack://application:,,,/C4Net.Framework.MVVM;component/Resources/C4NetControls.xaml" />
                <ResourceDictionary Source="pack://application:,,,/C4Net.Framework.MVVM;component/Resources/WhiteIcons.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="10" />
            <RowDefinition Height="20" />
            <RowDefinition Height="5" />
            <RowDefinition Height="20" />
            <RowDefinition Height="1*" />
            <RowDefinition Height="50" />
            <RowDefinition Height="10" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="10" />
            <ColumnDefinition Width="40" />
            <ColumnDefinition Width="5" />
            <ColumnDefinition Width="1*" />
            <ColumnDefinition Width="1*" />
            <ColumnDefinition Width="10" />
        </Grid.ColumnDefinitions>
        <TextBlock Grid.Row="1" Grid.Column="1" Text="Key" TextAlignment="Right" VerticalAlignment="Center" Foreground="White"/>
        <TextBox Grid.Row="1" Grid.Column="3" 
                 Text="{Binding Key, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged, NotifyOnValidationError=True}"/>
        <TextBlock Grid.Row="3" Grid.Column="1" Text="Value" TextAlignment="Right" VerticalAlignment="Center" Foreground="White"/>
        <TextBox x:Name="Value" Grid.Row="3" Grid.Column="3" />
        <StackPanel Orientation="Horizontal" Grid.Row="5" Grid.Column="3" Grid.ColumnSpan="2"   HorizontalAlignment="Right">
            <Button Width="50"  Style="{DynamicResource MetroCircleButtonStyle}" Foreground="{DynamicResource FlyoutWhiteBrush}"
                            cal:Message.Attach="[Event Click] = [Action Save]">
                <Rectangle Width="15" Height="15">
                    <Rectangle.Fill>
                        <VisualBrush Stretch="Fill" Visual="{StaticResource appwhite_save}" />
                    </Rectangle.Fill>
                </Rectangle>
            </Button>
            <Button Width="50"  Style="{DynamicResource MetroCircleButtonStyle}" Foreground="{DynamicResource FlyoutWhiteBrush}"
                            cal:Message.Attach="[Event Click] = [Action Cancel]">
                <Rectangle Width="15" Height="15">
                    <Rectangle.Fill>
                        <VisualBrush Stretch="Fill" Visual="{StaticResource appwhite_cancel}" />
                    </Rectangle.Fill>
                </Rectangle>
            </Button>
        </StackPanel>
    </Grid>
</UserControl>
